/**
 * @(#) DExpenseFacade.as
 *
 * @date		2010. 12. 23
 * @version		1.0
 * @author		Shin, Yunwoo
 * @client		Service Ace
 * @module		DExpense (석식비 신청)
 * @description	module facade
 * 				command를 등록한다.
 */
package com.skt.common_hr.holotreq_nos
{
	import com.skt.common_hr.common.puremvc.CommonFacade;
	import com.skt.common_hr.holotreq_nos.controller.StartupCommand;

	import flash.display.DisplayObject;

	public class HolOtReqFacade extends CommonFacade
	{
		public static const STARTUP:String 							= 'startup';
		public static const CLOSE_MODULE:String						= 'closeModule';

		public static const LOAD_CALENDAR_COMPLETE:String		= 'LOAD_CALENDAR_COMPLETE';
		public static const LOAD_CALENDAR_FAILED:String			= 'LOAD_CALENDAR_FAILED';

		public static const LOAD_TEAMVACATION_COMPLETE:String	= 'LOAD_TEAMVACATION_COMPLETE';
		public static const LOAD_VACATION_QUOTA_COMPLETE:String	= 'LOAD_VACATION_QUOTA_COMPLETE';

		public static const LOAD_TEAMVACATION_FAILED:String	= 'LOAD_TEAMVACATION_FAILED';
		public static const LOAD_VACATION_QUOTA_FAILED:String	= 'LOAD_VACATION_QUOTA_FAILED';



		public function HolOtReqFacade( key:String )
		{
			super(key);
		}

        /**
         * Singleton ApplicationFacade Factory Method
         */
        public static function getInstance( key:String ) : HolOtReqFacade
        {
            if ( instanceMap[ key ] == null ) instanceMap[ key ] = new HolOtReqFacade( key );
            return instanceMap[ key ] as HolOtReqFacade;
        }

        /**
         * Register Commands with the Controller
         *     - parent 클래스의 생성자에서 자동으로 호출됨
         */
        override protected function initializeController( ) : void {
            super.initializeController();
            registerCommand( STARTUP, StartupCommand);
        }

        /**
         * Module의 시작점으로 Certificate.mxml의 creationComplete 이벤트에서 호출한다.
         *
         */
        public function startup(app:Object) :void
        {
        	this.app = app as DisplayObject;
            sendNotification( STARTUP, app );
        }

	}
}